
#delimit ;

 use "C:\WORK\My Dropbox\H-SPACE\SUBMISSIONS\SUBMITTED\Swing\BJPS_revision\data_BJPOLS_annual.dta", clear ;

drop if obs<100 ;

cd "C:\WORK\My Dropbox\H-SPACE\SUBMISSIONS\SUBMITTED\Swing\BJPS_revision" ;

local controls  PRincome logpop aged kids unemployment disaster i.year ;

/*
/////////*********************//////////////////////
/////////*********************//////////////////////
//////******* FEDEXP - YEAR *************///////////////////
///////////******************////////////////////////
///////////////////*********/////////////////////
*/

/* FEDEXP SWING APPENDIX TAB 2 (TAB 1 IS SUMMARY STATS) */

xi: reg PRfedexp indL1 D1 D2 D3 `controls', cluster(stcode) ;
outreg2  indL1   PRincome logpop aged kids unemployment disaster using tab2_bjps.out, nolabel bdec(4) rdec(4) replace ; 
xi: reg PRfedexp sdL1 D1 D2 D3 `controls', cluster(stcode) ;
outreg2  sdL1   PRincome logpop aged kids unemployment disaster using tab2_bjps.out, nolabel bdec(4) rdec(4) append ; 
xi: reg PRfedexp indL1   `controls' i.stcode, cluster(stcode) ;
outreg2  indL1   PRincome logpop aged kids unemployment disaster using tab2_bjps.out, nolabel bdec(4) rdec(4)  append ;
xi: reg PRfedexp sdL1   `controls' i.stcode, cluster(stcode) ;
outreg2  sdL1   PRincome logpop aged kids unemployment disaster using tab2_bjps.out, nolabel bdec(4) rdec(4)  append ; 
 

/* FEDEXP CLOSENESS APPENDIX TAB3 */
xi: reg PRfedexp closeL1   `controls' D1 D2 D3, cluster(stcode) ;
outreg2  closeL1   PRincome logpop aged kids unemployment disaster using tab3_bjps.out, nolabel bdec(4) rdec(4)  replace ;
xi: reg PRfedexp closevoteL1   `controls' D1 D2 D3, cluster(stcode) ;
outreg2  closevoteL1   PRincome logpop aged kids unemployment disaster using tab3_bjps.out, nolabel bdec(4) rdec(4)  append ;
xi: reg PRfedexp closeL1   `controls' i.stcode, cluster(stcode) ;
outreg2  closeL1   PRincome logpop aged kids unemployment disaster using tab3_bjps.out, nolabel bdec(4) rdec(4)  append ;
xi: reg PRfedexp closevoteL1   `controls' i.stcode, cluster(stcode) ;
outreg2  closevoteL1   PRincome logpop aged kids unemployment disaster using tab3_bjps.out, nolabel bdec(4) rdec(4)  append ;


/* FEDEXP PARTISANSHIP APPENDIX TAB4 */
xi: reg PRfedexp ideoL1   `controls' D1 D2 D3, cluster(stcode) ;
outreg2  ideoL1   PRincome logpop aged kids unemployment disaster using tab4_bjps.out, nolabel bdec(4) rdec(4)  replace ;
xi: reg PRfedexp presvoteL1   `controls' D1 D2 D3, cluster(stcode) ;
outreg2  presvoteL1   PRincome logpop aged kids unemployment disaster using tab4_bjps.out, nolabel bdec(4) rdec(4)  append ;
xi: reg PRfedexp ideoL1   `controls' i.stcode, cluster(stcode) ;
outreg2  ideoL1   PRincome logpop aged kids unemployment disaster using tab4_bjps.out, nolabel bdec(4) rdec(4)  append ;
xi: reg PRfedexp presvoteL1   `controls' i.stcode, cluster(stcode) ;
outreg2  presvoteL1   PRincome logpop aged kids unemployment disaster using tab4_bjps.out, nolabel bdec(4) rdec(4)  append ;


/* FEDEXP JOINT TEST APPENDIX TAB5 */
xi: reg PRfedexp indL1 closeL1 ideoL1   `controls' D1 D2 D3, cluster(stcode) ;
outreg2  indL1 closeL1 ideoL1 PRincome logpop aged kids unemployment disaster using tab5_bjps.out, nolabel bdec(4) rdec(4)  replace ;
xi: reg PRfedexp sdL1 closevoteL1 presvoteL1  `controls' D1 D2 D3, cluster(stcode) ;
outreg2  sdL1 closevoteL1 presvoteL1 PRincome logpop aged kids unemployment disaster using tab5_bjps.out, nolabel bdec(4) rdec(4)  append ;
xi: reg PRfedexp indL1 closeL1 ideoL1 `controls' i.stcode, cluster(stcode) ;
outreg2  indL1 closeL1 ideoL1  PRincome logpop aged kids unemployment disaster using tab5_bjps.out, nolabel bdec(4) rdec(4)  append ;
xi: reg PRfedexp sdL1 closevoteL1 presvoteL1 `controls' i.stcode, cluster(stcode) ;
outreg2  sdL1 closevoteL1 presvoteL1  PRincome logpop aged kids unemployment disaster using tab5_bjps.out, nolabel bdec(4) rdec(4)  append ;

/*

/////////*********************//////////////////////
/////////*********************//////////////////////
//////******* TARGETABLE - YEAR *************///////////////////
///////////******************////////////////////////
///////////////////*********/////////////////////
*/

/* TARGET SWING APPENDIX TAB 6 */

xi: reg PRtarget indL1 D1 D2 D3 `controls', cluster(stcode) ;
outreg2  indL1   PRincome logpop aged kids unemployment disaster using tab6_bjps.out, nolabel bdec(4) rdec(4) replace ; 
xi: reg PRtarget sdL1 D1 D2 D3 `controls', cluster(stcode) ;
outreg2  sdL1   PRincome logpop aged kids unemployment disaster using tab6_bjps.out, nolabel bdec(4) rdec(4) append ; 
xi: reg PRtarget indL1   `controls' i.stcode, cluster(stcode) ;
outreg2  indL1   PRincome logpop aged kids unemployment disaster using tab6_bjps.out, nolabel bdec(4) rdec(4)  append ;
xi: reg PRtarget sdL1   `controls' i.stcode, cluster(stcode) ;
outreg2  sdL1   PRincome logpop aged kids unemployment disaster using tab6_bjps.out, nolabel bdec(4) rdec(4)  append ; 
 

/* TARGET CLOSENESS APPENDIX TAB7 */
xi: reg PRtarget closeL1   `controls' D1 D2 D3, cluster(stcode) ;
outreg2  closeL1   PRincome logpop aged kids unemployment disaster using tab7_bjps.out, nolabel bdec(4) rdec(4)  replace ;
xi: reg PRtarget closevoteL1   `controls' D1 D2 D3, cluster(stcode) ;
outreg2  closevoteL1   PRincome logpop aged kids unemployment disaster using tab7_bjps.out, nolabel bdec(4) rdec(4)  append ;
xi: reg PRtarget closeL1   `controls' i.stcode, cluster(stcode) ;
outreg2  closeL1   PRincome logpop aged kids unemployment disaster using tab7_bjps.out, nolabel bdec(4) rdec(4)  append ;
xi: reg PRtarget closevoteL1   `controls' i.stcode, cluster(stcode) ;
outreg2  closevoteL1   PRincome logpop aged kids unemployment disaster using tab7_bjps.out, nolabel bdec(4) rdec(4)  append ;


/* TARGET PARTISANSHIP APPENDIX TAB8 */
xi: reg PRtarget ideoL1   `controls' D1 D2 D3, cluster(stcode) ;
outreg2  ideoL1   PRincome logpop aged kids unemployment disaster using tab8_bjps.out, nolabel bdec(4) rdec(4)  replace ;
xi: reg PRtarget presvoteL1   `controls' D1 D2 D3, cluster(stcode) ;
outreg2  presvoteL1   PRincome logpop aged kids unemployment disaster using tab8_bjps.out, nolabel bdec(4) rdec(4)  append ;
xi: reg PRtarget ideoL1   `controls' i.stcode, cluster(stcode) ;
outreg2  ideoL1   PRincome logpop aged kids unemployment disaster using tab8_bjps.out, nolabel bdec(4) rdec(4)  append ;
xi: reg PRtarget presvoteL1   `controls' i.stcode, cluster(stcode) ;
outreg2  presvoteL1   PRincome logpop aged kids unemployment disaster using tab8_bjps.out, nolabel bdec(4) rdec(4)  append ;


/* TARGET JOINT TEST APPENDIX TAB9 */
xi: reg PRtarget indL1 closeL1 ideoL1   `controls' D1 D2 D3, cluster(stcode) ;
outreg2  indL1 closeL1 ideoL1 PRincome logpop aged kids unemployment disaster using tab9_bjps.out, nolabel bdec(4) rdec(4)  replace ;
xi: reg PRtarget sdL1 closevoteL1 presvoteL1  `controls' D1 D2 D3, cluster(stcode) ;
outreg2  sdL1 closevoteL1 presvoteL1 PRincome logpop aged kids unemployment disaster using tab9_bjps.out, nolabel bdec(4) rdec(4)  append ;
xi: reg PRtarget indL1 closeL1 ideoL1 `controls' i.stcode, cluster(stcode) ;
outreg2  indL1 closeL1 ideoL1  PRincome logpop aged kids unemployment disaster using tab9_bjps.out, nolabel bdec(4) rdec(4)  append ;
xi: reg PRtarget sdL1 closevoteL1 presvoteL1 `controls' i.stcode, cluster(stcode) ;
outreg2  sdL1 closevoteL1 presvoteL1  PRincome logpop aged kids unemployment disaster using tab9_bjps.out, nolabel bdec(4) rdec(4)  append ;




/*
/////////*********************//////////////////////
/////////*********************//////////////////////
//////******* GRANTS - YEAR *************///////////////////
///////////******************////////////////////////
///////////////////*********/////////////////////
*/

/* GRANTS SWING APPENDIX TAB 10 */

xi: reg PRgrants indL1 D1 D2 D3 `controls', cluster(stcode) ;
outreg2  indL1   PRincome logpop aged kids unemployment disaster using tab10_bjps.out, nolabel bdec(4) rdec(4) replace ; 
xi: reg PRgrants sdL1 D1 D2 D3 `controls', cluster(stcode) ;
outreg2  sdL1   PRincome logpop aged kids unemployment disaster using tab10_bjps.out, nolabel bdec(4) rdec(4) append ; 
xi: reg PRgrants indL1   `controls' i.stcode, cluster(stcode) ;
outreg2  indL1   PRincome logpop aged kids unemployment disaster using tab10_bjps.out, nolabel bdec(4) rdec(4)  append ;
xi: reg PRgrants sdL1   `controls' i.stcode, cluster(stcode) ;
outreg2  sdL1   PRincome logpop aged kids unemployment disaster using tab10_bjps.out, nolabel bdec(4) rdec(4)  append ; 
 

/* GRANTS CLOSENESS APPENDIX TAB11 */
xi: reg PRgrants closeL1   `controls' D1 D2 D3, cluster(stcode) ;
outreg2  closeL1   PRincome logpop aged kids unemployment disaster using tab11_bjps.out, nolabel bdec(4) rdec(4)  replace ;
xi: reg PRgrants closevoteL1   `controls' D1 D2 D3, cluster(stcode) ;
outreg2  closevoteL1   PRincome logpop aged kids unemployment disaster using tab11_bjps.out, nolabel bdec(4) rdec(4)  append ;
xi: reg PRgrants closeL1   `controls' i.stcode, cluster(stcode) ;
outreg2  closeL1   PRincome logpop aged kids unemployment disaster using tab11_bjps.out, nolabel bdec(4) rdec(4)  append ;
xi: reg PRgrants closevoteL1   `controls' i.stcode, cluster(stcode) ;
outreg2  closevoteL1   PRincome logpop aged kids unemployment disaster using tab11_bjps.out, nolabel bdec(4) rdec(4)  append ;


/* GRANTS PARTISANSHIP APPENDIX TAB12 */
xi: reg PRgrants ideoL1   `controls' D1 D2 D3, cluster(stcode) ;
outreg2  ideoL1   PRincome logpop aged kids unemployment disaster using tab12_bjps.out, nolabel bdec(4) rdec(4)  replace ;
xi: reg PRgrants presvoteL1   `controls' D1 D2 D3, cluster(stcode) ;
outreg2  presvoteL1   PRincome logpop aged kids unemployment disaster using tab12_bjps.out, nolabel bdec(4) rdec(4)  append ;
xi: reg PRgrants ideoL1   `controls' i.stcode, cluster(stcode) ;
outreg2  ideoL1   PRincome logpop aged kids unemployment disaster using tab12_bjps.out, nolabel bdec(4) rdec(4)  append ;
xi: reg PRgrants presvoteL1   `controls' i.stcode, cluster(stcode) ;
outreg2  presvoteL1   PRincome logpop aged kids unemployment disaster using tab12_bjps.out, nolabel bdec(4) rdec(4)  append ;


/* GRANTS JOINT TEST APPENDIX TAB12 */
xi: reg PRgrants indL1 closeL1 ideoL1   `controls' D1 D2 D3, cluster(stcode) ;
outreg2  indL1 closeL1 ideoL1 PRincome logpop aged kids unemployment disaster using tab13_bjps.out, nolabel bdec(4) rdec(4)  replace ;
xi: reg PRgrants sdL1 closevoteL1 presvoteL1  `controls' D1 D2 D3, cluster(stcode) ;
outreg2  sdL1 closevoteL1 presvoteL1 PRincome logpop aged kids unemployment disaster using tab13_bjps.out, nolabel bdec(4) rdec(4)  append ;
xi: reg PRgrants indL1 closeL1 ideoL1 `controls' i.stcode, cluster(stcode) ;
outreg2  indL1 closeL1 ideoL1  PRincome logpop aged kids unemployment disaster using tab13_bjps.out, nolabel bdec(4) rdec(4)  append ;
xi: reg PRgrants sdL1 closevoteL1 presvoteL1 `controls' i.stcode, cluster(stcode) ;
outreg2  sdL1 closevoteL1 presvoteL1  PRincome logpop aged kids unemployment disaster using tab13_bjps.out, nolabel bdec(4) rdec(4)  append ;



///****TERM REGRESSIONS***////

#delimit ;
cd "C:\Documents and Settings\larcines\Desktop\My Dropbox\H-SPACE\SUBMISSIONS\SUBMITTED\Swing\BJPS_revision" ;
use data_BJPOLS_term.dta, clear ;


encode (stcode), gen(stnum);
xtset stnum term;


drop if obs_M<100 ;

local controls_t  PRincome_M logpop_M aged_M kids_M unemployment_M disaster i.term ;

/*
/////////*********************//////////////////////
/////////*********************//////////////////////
//////******* FEDEXP - TERM *************///////////////////
///////////******************////////////////////////
///////////////////*********/////////////////////
*/

/* FEDEXP TERM SWING APPENDIX TAB 2  */

xi: reg PRfedexp_M indL1_M  `controls_t' D1 D2 D3 , cluster(stcode) ;
outreg2  indL1_M PRincome_M logpop_M aged_M kids_M unemployment_M disaster  using tab2_bjps.out, nolabel bdec(4) rdec(4) append ; 
xi: reg PRfedexp_M sdL1_M  `controls_t' D1 D2 D3, cluster(stcode) ;
outreg2  sdL1_M  PRincome_M logpop_M aged_M kids_M unemployment_M disaster using tab2_bjps.out, nolabel bdec(4) rdec(4) append ; 
xi: reg PRfedexp_M indL1_M  `controls_t' i.stcode , cluster(stcode) ;
outreg2  indL1_M PRincome_M logpop_M aged_M kids_M unemployment_M disaster  using tab2_bjps.out, nolabel bdec(4) rdec(4) append ; 
xi: reg PRfedexp_M sdL1_M  `controls_t' i.stcode, cluster(stcode) ;
outreg2  sdL1_M  PRincome_M logpop_M aged_M kids_M unemployment_M disaster using tab2_bjps.out, nolabel bdec(4) rdec(4) append ; 


/* FEDEXP TERM CLOSE APPENDIX TAB 3  */
xi: reg PRfedexp_M closeL1_M  `controls_t' D1 D2 D3 , cluster(stcode) ;
outreg2  closeL1_M PRincome_M logpop_M aged_M kids_M unemployment_M disaster  using tab3_bjps.out, nolabel bdec(4) rdec(4) append ; 
xi: reg PRfedexp_M closevoteL1_M  `controls_t' D1 D2 D3, cluster(stcode) ;
outreg2  closevoteL1_M  PRincome_M logpop_M aged_M kids_M unemployment_M disaster using tab3_bjps.out, nolabel bdec(4) rdec(4) append ; 
xi: reg PRfedexp_M closeL1_M  `controls_t' i.stcode , cluster(stcode) ;
outreg2  closeL1_M PRincome_M logpop_M aged_M kids_M unemployment_M disaster  using tab3_bjps.out, nolabel bdec(4) rdec(4) append ; 
xi: reg PRfedexp_M closevoteL1_M  `controls_t' i.stcode, cluster(stcode) ;
outreg2  closevoteL1_M  PRincome_M logpop_M aged_M kids_M unemployment_M disaster using tab3_bjps.out, nolabel bdec(4) rdec(4) append ; 


/* FEDEXP TERM PARTISANSHIP APPENDIX TAB 4  */
xi: reg PRfedexp_M ideoL1_M  `controls_t' D1 D2 D3 , cluster(stcode) ;
outreg2  ideoL1_M PRincome_M logpop_M aged_M kids_M unemployment_M disaster  using tab4_bjps.out, nolabel bdec(4) rdec(4) append ; 
xi: reg PRfedexp_M presvoteL1_M  `controls_t' D1 D2 D3, cluster(stcode) ;
outreg2  presvoteL1_M  PRincome_M logpop_M aged_M kids_M unemployment_M disaster using tab4_bjps.out, nolabel bdec(4) rdec(4) append ; 
xi: reg PRfedexp_M ideoL1_M  `controls_t' i.stcode , cluster(stcode) ;
outreg2  ideoL1_M PRincome_M logpop_M aged_M kids_M unemployment_M disaster  using tab4_bjps.out, nolabel bdec(4) rdec(4) append ; 
xi: reg PRfedexp_M presvoteL1_M  `controls_t' i.stcode, cluster(stcode) ;
outreg2  presvoteL1_M  PRincome_M logpop_M aged_M kids_M unemployment_M disaster using tab4_bjps.out, nolabel bdec(4) rdec(4) append ; 


/* FEDEXP TERM JOINT TEST APPENDIX TAB 5  */
xi: reg PRfedexp_M indL1_M closeL1_M ideoL1_M  `controls_t' D1 D2 D3 , cluster(stcode) ;
outreg2  indL1_M closeL1_M ideoL1_M PRincome_M logpop_M aged_M kids_M unemployment_M disaster  using tab5_bjps.out, nolabel bdec(4) rdec(4) append ; 
xi: reg PRfedexp_M sdL1_M closevoteL1_M presvoteL1_M  `controls_t' D1 D2 D3, cluster(stcode) ;
outreg2  sdL1_M closevoteL1_M presvoteL1_M PRincome_M logpop_M aged_M kids_M unemployment_M disaster using tab5_bjps.out, nolabel bdec(4) rdec(4) append ; 
xi: reg PRfedexp_M indL1_M closeL1_M ideoL1_M  `controls_t' i.stcode , cluster(stcode) ;
outreg2  indL1_M closeL1_M ideoL1_M PRincome_M logpop_M aged_M kids_M unemployment_M disaster  using tab5_bjps.out, nolabel bdec(4) rdec(4) append ; 
xi: reg PRfedexp_M sdL1_M closevoteL1_M presvoteL1_M  `controls_t' i.stcode, cluster(stcode) ;
outreg2  sdL1_M closevoteL1_M presvoteL1_M  PRincome_M logpop_M aged_M kids_M unemployment_M disaster using tab5_bjps.out, nolabel bdec(4) rdec(4) append ;




/*
/////////*********************//////////////////////
/////////*********************//////////////////////
//////******* TARGET - TERM *************///////////////////
///////////******************////////////////////////
///////////////////*********/////////////////////
*/

/* TARGET TERM SWING APPENDIX TAB 6  */

xi: reg PRtarget_M indL1_M  `controls_t' D1 D2 D3 , cluster(stcode) ;
outreg2  indL1_M PRincome_M logpop_M aged_M kids_M unemployment_M disaster  using tab6_bjps.out, nolabel bdec(4) rdec(4) append ; 
xi: reg PRtarget_M sdL1_M  `controls_t' D1 D2 D3, cluster(stcode) ;
outreg2  sdL1_M  PRincome_M logpop_M aged_M kids_M unemployment_M disaster using tab6_bjps.out, nolabel bdec(4) rdec(4) append ; 
xi: reg PRtarget_M indL1_M  `controls_t' i.stcode , cluster(stcode) ;
outreg2  indL1_M PRincome_M logpop_M aged_M kids_M unemployment_M disaster  using tab6_bjps.out, nolabel bdec(4) rdec(4) append ; 
xi: reg PRtarget_M sdL1_M  `controls_t' i.stcode, cluster(stcode) ;
outreg2  sdL1_M  PRincome_M logpop_M aged_M kids_M unemployment_M disaster using tab6_bjps.out, nolabel bdec(4) rdec(4) append ; 


/* TARGET TERM CLOSE APPENDIX TAB 7  */
xi: reg PRtarget_M closeL1_M  `controls_t' D1 D2 D3 , cluster(stcode) ;
outreg2  closeL1_M PRincome_M logpop_M aged_M kids_M unemployment_M disaster  using tab7_bjps.out, nolabel bdec(4) rdec(4) append ; 
xi: reg PRtarget_M closevoteL1_M  `controls_t' D1 D2 D3, cluster(stcode) ;
outreg2  closevoteL1_M  PRincome_M logpop_M aged_M kids_M unemployment_M disaster using tab7_bjps.out, nolabel bdec(4) rdec(4) append ; 
xi: reg PRtarget_M closeL1_M  `controls_t' i.stcode , cluster(stcode) ;
outreg2  closeL1_M PRincome_M logpop_M aged_M kids_M unemployment_M disaster  using tab7_bjps.out, nolabel bdec(4) rdec(4) append ; 
xi: reg PRtarget_M closevoteL1_M  `controls_t' i.stcode, cluster(stcode) ;
outreg2  closevoteL1_M  PRincome_M logpop_M aged_M kids_M unemployment_M disaster using tab7_bjps.out, nolabel bdec(4) rdec(4) append ; 


/* TARGET TERM PARTISANSHIP APPENDIX TAB 8  */
xi: reg PRtarget_M ideoL1_M  `controls_t' D1 D2 D3 , cluster(stcode) ;
outreg2  ideoL1_M PRincome_M logpop_M aged_M kids_M unemployment_M disaster  using tab8_bjps.out, nolabel bdec(4) rdec(4) append ; 
xi: reg PRtarget_M presvoteL1_M  `controls_t' D1 D2 D3, cluster(stcode) ;
outreg2  presvoteL1_M  PRincome_M logpop_M aged_M kids_M unemployment_M disaster using tab8_bjps.out, nolabel bdec(4) rdec(4) append ; 
xi: reg PRtarget_M ideoL1_M  `controls_t' i.stcode , cluster(stcode) ;
outreg2  ideoL1_M PRincome_M logpop_M aged_M kids_M unemployment_M disaster  using tab8_bjps.out, nolabel bdec(4) rdec(4) append ; 
xi: reg PRtarget_M presvoteL1_M  `controls_t' i.stcode, cluster(stcode) ;
outreg2  presvoteL1_M  PRincome_M logpop_M aged_M kids_M unemployment_M disaster using tab8_bjps.out, nolabel bdec(4) rdec(4) append ; 


/* TARGET TERM JOINT TEST APPENDIX TAB 9  */
xi: reg PRtarget_M indL1_M closeL1_M ideoL1_M  `controls_t' D1 D2 D3 , cluster(stcode) ;
outreg2  indL1_M closeL1_M ideoL1_M PRincome_M logpop_M aged_M kids_M unemployment_M disaster  using tab9_bjps.out, nolabel bdec(4) rdec(4) append ; 
xi: reg PRtarget_M sdL1_M closevoteL1_M presvoteL1_M  `controls_t' D1 D2 D3, cluster(stcode) ;
outreg2  sdL1_M closevoteL1_M presvoteL1_M PRincome_M logpop_M aged_M kids_M unemployment_M disaster using tab9_bjps.out, nolabel bdec(4) rdec(4) append ; 
xi: reg PRtarget_M indL1_M closeL1_M ideoL1_M  `controls_t' i.stcode , cluster(stcode) ;
outreg2  indL1_M closeL1_M ideoL1_M PRincome_M logpop_M aged_M kids_M unemployment_M disaster  using tab9_bjps.out, nolabel bdec(4) rdec(4) append ; 
xi: reg PRtarget_M sdL1_M closevoteL1_M presvoteL1_M  `controls_t' i.stcode, cluster(stcode) ;
outreg2  sdL1_M closevoteL1_M presvoteL1_M  PRincome_M logpop_M aged_M kids_M unemployment_M disaster using tab9_bjps.out, nolabel bdec(4) rdec(4) append ;




/*
/////////*********************//////////////////////
/////////*********************//////////////////////
//////******* GRANTS - TERM *************///////////////////
///////////******************////////////////////////
///////////////////*********/////////////////////
*/

/* GRANTS TERM SWING APPENDIX TAB 10  */

xi: reg PRgrants_M indL1_M  `controls_t' D1 D2 D3 , cluster(stcode) ;
outreg2  indL1_M PRincome_M logpop_M aged_M kids_M unemployment_M disaster  using tab10_bjps.out, nolabel bdec(4) rdec(4) append ; 
xi: reg PRgrants_M sdL1_M  `controls_t' D1 D2 D3, cluster(stcode) ;
outreg2  sdL1_M  PRincome_M logpop_M aged_M kids_M unemployment_M disaster using tab10_bjps.out, nolabel bdec(4) rdec(4) append ; 
xi: reg PRgrants_M indL1_M  `controls_t' i.stcode , cluster(stcode) ;
outreg2  indL1_M PRincome_M logpop_M aged_M kids_M unemployment_M disaster  using tab10_bjps.out, nolabel bdec(4) rdec(4) append ; 
xi: reg PRgrants_M sdL1_M  `controls_t' i.stcode, cluster(stcode) ;
outreg2  sdL1_M  PRincome_M logpop_M aged_M kids_M unemployment_M disaster using tab10_bjps.out, nolabel bdec(4) rdec(4) append ; 


/* GRANTS TERM CLOSE APPENDIX TAB 11  */
xi: reg PRgrants_M closeL1_M  `controls_t' D1 D2 D3 , cluster(stcode) ;
outreg2  closeL1_M PRincome_M logpop_M aged_M kids_M unemployment_M disaster  using tab11_bjps.out, nolabel bdec(4) rdec(4) append ; 
xi: reg PRgrants_M closevoteL1_M  `controls_t' D1 D2 D3, cluster(stcode) ;
outreg2  closevoteL1_M  PRincome_M logpop_M aged_M kids_M unemployment_M disaster using tab11_bjps.out, nolabel bdec(4) rdec(4) append ; 
xi: reg PRgrants_M closeL1_M  `controls_t' i.stcode , cluster(stcode) ;
outreg2  closeL1_M PRincome_M logpop_M aged_M kids_M unemployment_M disaster  using tab11_bjps.out, nolabel bdec(4) rdec(4) append ; 
xi: reg PRgrants_M closevoteL1_M  `controls_t' i.stcode, cluster(stcode) ;
outreg2  closevoteL1_M  PRincome_M logpop_M aged_M kids_M unemployment_M disaster using tab11_bjps.out, nolabel bdec(4) rdec(4) append ; 


/* GRANTS TERM PARTISANSHIP APPENDIX TAB 12  */
xi: reg PRgrants_M ideoL1_M  `controls_t' D1 D2 D3 , cluster(stcode) ;
outreg2  ideoL1_M PRincome_M logpop_M aged_M kids_M unemployment_M disaster  using tab12_bjps.out, nolabel bdec(4) rdec(4) append ; 
xi: reg PRgrants_M presvoteL1_M  `controls_t' D1 D2 D3, cluster(stcode) ;
outreg2  presvoteL1_M  PRincome_M logpop_M aged_M kids_M unemployment_M disaster using tab12_bjps.out, nolabel bdec(4) rdec(4) append ; 
xi: reg PRgrants_M ideoL1_M  `controls_t' i.stcode , cluster(stcode) ;
outreg2  ideoL1_M PRincome_M logpop_M aged_M kids_M unemployment_M disaster  using tab12_bjps.out, nolabel bdec(4) rdec(4) append ; 
xi: reg PRgrants_M presvoteL1_M  `controls_t' i.stcode, cluster(stcode) ;
outreg2  presvoteL1_M  PRincome_M logpop_M aged_M kids_M unemployment_M disaster using tab12_bjps.out, nolabel bdec(4) rdec(4) append ; 


/* GRANTS TERM JOINT TEST APPENDIX TAB 13  */
xi: reg PRgrants_M indL1_M closeL1_M ideoL1_M  `controls_t' D1 D2 D3 , cluster(stcode) ;
outreg2  indL1_M closeL1_M ideoL1_M PRincome_M logpop_M aged_M kids_M unemployment_M disaster  using tab13_bjps.out, nolabel bdec(4) rdec(4) append ; 
xi: reg PRgrants_M sdL1_M closevoteL1_M presvoteL1_M  `controls_t' D1 D2 D3, cluster(stcode) ;
outreg2  sdL1_M closevoteL1_M presvoteL1_M PRincome_M logpop_M aged_M kids_M unemployment_M disaster using tab13_bjps.out, nolabel bdec(4) rdec(4) append ; 
xi: reg PRgrants_M indL1_M closeL1_M ideoL1_M  `controls_t' i.stcode , cluster(stcode) ;
outreg2  indL1_M closeL1_M ideoL1_M PRincome_M logpop_M aged_M kids_M unemployment_M disaster  using tab13_bjps.out, nolabel bdec(4) rdec(4) append ; 
xi: reg PRgrants_M sdL1_M closevoteL1_M presvoteL1_M  `controls_t' i.stcode, cluster(stcode) ;
outreg2  sdL1_M closevoteL1_M presvoteL1_M  PRincome_M logpop_M aged_M kids_M unemployment_M disaster using tab13_bjps.out, nolabel bdec(4) rdec(4) append ;






















